package com.zhongge.model.entity;

import java.util.Date;

/**
 * @ClassName Comment
 * @Description TODO 评论表
 * @Author zhongge
 * @Version 1.0
 */
public class Comment {
    private Integer id;//评论的ID
    private String content;//评论内容
    private Integer userId;//用户ID
    private Integer articleId;//文章ID
    private Date createdTime;//评论时间

    // 非数据库字段，用于页面显示
    private String username;

    // 构造方法
    public Comment() {}

    public Comment(String content, Integer userId, Integer articleId) {
        this.content = content;
        this.userId = userId;
        this.articleId = articleId;
    }

    // getter和setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getArticleId() {
        return articleId;
    }

    public void setArticleId(Integer articleId) {
        this.articleId = articleId;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
